<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <script src="http://libs.baidu.com/jquery/2.1.4/jquery.min.js"></script>
  <style>

  </style>
</head>
<my-element></my-element>
<script>
  /* https://anpush.com/push/setting */
  const your_token = '9BBNXMY0LZM9I7WDLKXZLCMGUPTPC7';
  var settings = {
    "url": "https://api.anpush.com/push/" + your_token,
    "method": "POST",
    "timeout": 0,
    "headers": {
      "Content-Type": "application/x-www-form-urlencoded"
    },
    "data": {
      'title': 'test',
      'content': 'boxue is 666',
      'channel': '37116'
    }
  };

  $.ajax(settings).done(function (response) {
    console.log(response);
  });

  // const sheet = new CSSStyleSheet();
  // sheet.replaceSync('div{color:red;}');

  // class MyElement extends HTMLElement {
  //   constructor() {
  //     super();
  //     const shadowRoot = this.attachShadow({ mode: 'open' });
  //     const div = document.createElement('div');
  //     shadowRoot.adoptedStyleSheets = [sheet];
  //     div.textContent = 'Hello,boxue!';
  //     shadowRoot.appendChild(div);
  //   }
  // }
  // customElements.define('my-element', MyElement);

</script>

</body>

</html>